class Parant:

    def __init__(self, name):
        print("Parant init 被调用")
        self.name = name
        print("Parant init 调用结束")


class Son1(Parant):

    def __init__(self, name, age, *args, **kwargs):
        print("Son1 init 被调用")
        self.age = age
        # self.gender = gender
        super().__init__(name,  *args, **kwargs)
        print("Son1 init 调用结束")


class Son2(Parant):

    def __init__(self, name, gender, *args, **kwargs):
        print("Son2 init 被调用")
        self.gender = gender
        # self.name = name
        super().__init__(name, *args, **kwargs)
        print("Son2 init 调用结束")


class GrandSon(Son1, Son2):

    def __init__(self, name, age, gender):
        print("GrandSon init 被调用")
        super().__init__(name, age, gender)
        print("GrandSon init 调用结束")


grand = GrandSon('张三', '18', '男')

print(grand.__dict__)
